<?php
/**
 * @Author: Marte
 * @Date:   2017-08-08 14:34:46
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-08 15:33:08
 */

header('Content-Type:text/html;charset=utf-8');

include "../config_connect.php";//导入数据库

if(!isset($_POST["submit"])){
      exit('非法访问!');
  }
$_email=$_POST['email'];
$_nickname=$_POST['nickname'];
$_wx=$_POST['wx'];
$_phone=$_POST['phone'];
$_phoneyzm=$_POST['phoneyzm'];

// 如果手机验证未成功将返回原来注册页面


//如果手机验证成功了，提交至数据库


$sql="update userregisters set nickname='$_nickname',wx='$_wx',phone='$_phone' where email='$_email'";
 if ($_mysql->query($sql) == TRUE) {

    echo "<script>alert('恭喜您完善成功！请登录');location='../../dl.php'</script>";
    } else {
    echo "<script>alert('很抱歉您的资料完善失败，请您重新操作！');location='../../zc.php'</script>";

    }






























?>